//listflex
$('.listFlex').flexigrid
(
	{
		autoload: true,
		height: $('#main').height(),
		title: 'Punch List',
		url: root + module + '/listview',
		blockOpacity: 0,
		dataType: 'json',
		colModel : [
			{display: '', name : 'a.group_id', width : 40, align:'center', process: viewItem}
			,{display: 'Punch Name', name : 'punch_name', width : 120, align : 'left', sortable:true}
			,{display: 'Start Time', name : 'punch_starttime', width : 120, align : 'left', sortable:true}
			,{display: 'End Time', name : 'punch_endtime', width : 120, align : 'left', sortable:true}
			// ,{display: 'Username', name : 'a.username', width : 100, align : 'left', sortable:true}
			// ,{display: 'Email', name : 'a.email', width : 150, align : 'left', sortable:true}
			// ,{display: 'Role', name : 'b.role_name', width : 80, align : 'left', sortable:true}
			],
		buttons : [
			{name: 'Add', bclass: 'add', onpress : addItem},
			//{separator: true},
			{name: 'Delete', bclass: 'delete', onpress : deleteItem},
			//{separator: true}
		],
		newp: 1,
		sortname: "punch_name",
		sortorder: "asc",
		rp: 40,
		usepager: true,
		useRp: true,
		resizable: true,
		showTableToggleBtn: true,
		singleSelect: false
	}
);
